{% extends "tj3/tj3.html" %}


{% block content  %} 
<form action="." method="post" enctype="multipart/form-data">

<h2>Task periods</h2>
<table>
<thead>
<th>SCENARIO<th>START<th>END<th>MAX END<th>LENGTH<th>DURATION<th>EFFORT<th>COMPLETE
<th>MILESTONE<th>MAX START<th>MIN START<th>MIN END
</thead>
<tbody>
	<!--- existing periods --->
	{% for p in periods %}
<tr>
	<td> <a href={% url period_edit p.id %}>{{p.scenario}}</a>
	<td> {{p.start}}
	<td> {{p.end}}
	<td> {{p.max_end}}
	<td> {{p.length}}
	<td> {{p.duration}}
	<td> {{p.effort}}
	<td> {{p.complete}}
	<td> {{p.milestone}}
	<td> {{p.max_start}}
	<td> {{p.min_start}}
	<td> {{p.min_end}}
</tr>
	{% endfor %}
	
	<!--- new period --->
	{{ period_formset.management_form}}
	{% for p in period_formset.forms %}
	
<tr>
	<td> {{p.scenario}}
	<td> {{p.start}}
	<td> {{p.end}}
	<td> {{p.max_end}}
	<td> {{p.length}}
	<td> {{p.duration}}
	<td> {{p.effort}}
	<td> {{p.complete}}
	<td> {{p.milestone}}
	<td> {{p.max_start}}
	<td> {{p.min_start}}
	<td> {{p.min_end}}
</tr>
	{% endfor %}
</tbody>
</table>

<input type="submit" name="command" value="Create" class="button" />
</form>


{% endblock content %}
